#!/bin/bash
readonly FNAME='/proc/net/dev'
[[ -r "$FNAME" ]] || exit 0
while IFS=' :' read fIFACE fBin fPin JUNK JUNK JUNK JUNK JUNK JUNK fBout fPout JUNK; do
	for IFACE in "$@"; do
		read IFACE IFMAX JUNK <<< "$IFACE"
		[[ "$IFACE" == "$fIFACE" ]] && echo "iface,$IFACE,$IFMAX,$fPin:$fPout:$fBin:$fBout"
	done
done < "$FNAME"
